﻿using ServiceCore.Entity.Const.Site;
using ServiceCore.Entity.Model;
using System.Runtime.Serialization;

namespace ServiceCore.Entity.Arg
{
    [Serializable]
    [DataContract]
    public class ArgTextParse
    {
        [DataMember]
        public string SiteId { get; set; }

        [DataMember]
        public string Text { get; set; }

        public List<string> Lines { get; set; } = new List<string>();

        public List<TextParseDto> Datas { get; set; } = new List<TextParseDto>();

        [DataMember]
        public string ErrorMsg { get; set; }

        [DataMember]
        public DateTime CurTime { get; set; } = DateTime.Now;

        public List<TagTypeInfo> lstTagType { get; set; }
        public List<string> lstTagTypeName { get; set; }
        public List<TagInfo> lstTag { get; set; }
        public List<TextParseDto> lstParse = new List<TextParseDto>();
    }

    [Serializable]
    [DataContract]
    public class TextParseDto
    {
        /// <summary>
        /// 解析来源
        /// </summary>
        [DataMember]
        public string Source { get; set; }

        /// <summary>
        /// 解析来源
        /// </summary>
        [DataMember]
        public string SourceProcess { get; set; }

        /// <summary>
        /// 服务器
        /// </summary>
        [DataMember]
        public string ServiceType { get; set; } = SiteServiceType.SiteServiceType_Macao;

        /// <summary>
        /// 数组id
        /// </summary>
        [DataMember]
        public string SiteId { get; set; }

        /// <summary>
        /// 解析模式
        /// </summary>
        public string ParsemMode { get; set; }

        /// <summary>
        /// 解析子模式
        /// </summary>
        public string ParsemChildMode { get; set; }

        /// <summary>
        /// 标签类型列表
        /// </summary>
        public List<string> lstTagType { get; set; } = new List<string>();

        /// <summary>
        /// 标签列表
        /// </summary>
        [DataMember]
        public List<TagInfo> lstTag { get; set; } = new List<TagInfo>();

        /// <summary>
        /// 合计值
        /// </summary>
        public decimal? Total { get; set; }

        /// <summary>
        /// 解析结果
        /// </summary>
        [DataMember]
        public string Result { get; set; }

        /// <summary>
        /// 结果提示
        /// </summary>
        [DataMember]
        public string ResultTip { get; set; }
        /// <summary>
        /// 是否解析成功
        /// </summary>
        public bool IsParseSuccess { get; set; }
        /// <summary>
        /// 是否数字行
        /// </summary>
        public bool IsNumberLine { get; set; }
        /// <summary>
        /// 是否包含共行
        /// </summary>
        public bool IsTotalLine { get; set; }
    }
}
